function getSource() { 
    try {
        var vXheList = new XheList();
        vXheList.model.Table = "t_sys_source";
        vXheList.model.SortName = "id";
        vXheList.model.Columns = [
            ["id", "主键", "10", "null", "I", "", true],
            ["name", "名称", "10", "", "C", "", true],
            ["connection", "链接", "10", "", "C", "", true],
            ["username", "用户名", "10", "", "C", "", true],
            ["password", "密码", "10", "", "C", "", true]
        ];
        vXheList.model.Filter = [
            ["status", "A", "EQ", "I", 1]
        ];
        
        let vResult = vXheList.query();
      
        if (vResult.rows != undefined && vResult.rows.length > 0) {
            return vResult.rows;
        }
        else { 
            return null;
        }
    }
    catch (e) { 
        return null;
    }
}

function bindSource() { 
    try {
        if (SOURCELIST == null || SOURCELIST.length == 0) {
           
            let vResult = getSource();

            if (vResult != null) {

                for (let i = 0; i < vResult.length; i++) { 

                    SOURCELIST.push(
                        {
                            key: vResult[i]["id"],
                            name: vResult[i]["name"],
                            value: vResult[i]["connection"] + "##" + vResult[i]["username"] + "##" + vResult[i]["password"]
                        }
                    );
                }
            }
        }
    }
    catch (e) { 

    }
}